﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/admincp.Master" AutoEventWireup="true"
    CodeBehind="ListSlide.aspx.cs" Inherits="SES.CMS.AdminCP.ListSlide" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>
        Danh sách Slide</h2>
    <div style="width: 90%; float: left; margin-bottom: 10px; display: none;">
        Lựa chọn theo Danh mục:
        <asp:DropDownList ID="cboCategory" runat="server" AutoPostBack="True" OnSelectedIndexChanged="cboCategory_SelectedIndexChanged">
        </asp:DropDownList>
    </div>
    <asp:GridView ID="gvSlide" DataKeyNames="SlideID" runat="server" AutoGenerateColumns="False"
        CellPadding="4" CssClass="tstyle2" Width="100%" PagerStyle-CssClass="pgr" OnRowDeleting="gvSlide_RowDeleting" OnSelectedIndexChanged="gvSlide_SelectedIndexChanged"
        PageSize="100">
        <Columns>
            <asp:TemplateField HeaderText="Số TT" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
                <ItemTemplate>
                    <%#Container.DataItemIndex +1 %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Title" HeaderText="Tiêu đề" SortExpression="Title" />
            <asp:BoundField DataField="SlideURL" HeaderText="Đường dẫn" SortExpression="SlideURL" />
            <asp:TemplateField HeaderText="Thao tác" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:ImageButton ID="btEdit" runat="server" CommandName="Select" ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                    <asp:ImageButton ID="btDelete" runat="server" CommandArgument='<%#Eval("SlideID") %>'
                        CommandName="Delete" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:Button CssClass="button-gg-green" ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="Thêm mới" />
</asp:Content>
